package com.roroldo.springcloud.alibaba.service;

import com.roroldo.springcloud.alibaba.config.PaymentFallbackService;
import com.roroldo.springcloud.entities.CommonResult;
import com.roroldo.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 使用 fallback 方式是无法获取异常信息的，如果想要获取异常信息，可以使用 fallbackFactory参数
 * @author 落霞不孤
 */
//调用中关闭 9003 服务提供者
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallbackService.class)
public interface PaymentService {
    @GetMapping(value = "/paymentSQL/{id}")
    public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id);
}